#!/bin/bash
read -p "请输入你的ip地址：" ip
read -p "请输入你的用户名：" username
read -p "请输入你的密码：" password
arr=(ads_alert_rule_performance ads_aml_yb ads_customer_risk_overview ads_transaction_risk_report)
for tab in "${arr[@]}"
do
        sqoop import \
        --connect jdbc:oracle:thin:@"$ip":1521:orcl \
        --username "$username" \
        --password "$password" \
        --table "$tab" \
        --input-fields-terminated-by ',' \
        --input-lines-terminated-by '\n' \
        --export-dir "/user/hive/warehouse/ads.db/$tab" \
        --input-null-string "\\N" \
        --input-null-non-string "\\N" \
	    -m 1
done